package com.time.timespace.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.time.timespace.commons.dto.PageRequest;
import com.time.timespace.domain.dto.CategoryCountDTO;
import com.time.timespace.domain.dto.ChargeDTO;
import com.time.timespace.domain.entity.Charge;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

public interface ChargeService extends IService<Charge> {

    PageInfo<Charge> selectChargeById(PageRequest pageRequest, Long createdBy);

    PageInfo<Charge> selectCharge(PageRequest pageRequest, Charge charge);

    Charge saveCharge(Charge charge);

    void deleteCharge(Long chargeId);

    List<ChargeDTO> selectYearData(String year, Long userId);

    void exportExpense(HttpServletResponse response, String year, Long userId);

    List<CategoryCountDTO> categoryCount(String year, Long userId);
}
